package com.taptech.doufu.util;

import android.content.Context;
import android.content.Intent;

import com.taptech.doufu.ui.activity.ContainerFragmentActivity;
import com.taptech.doufu.ui.activity.DFHistoryActivity;
import com.taptech.doufu.ui.activity.DFKeepActivity;
import com.taptech.doufu.ui.activity.DFRssActivity;
import com.taptech.doufu.ui.activity.MoreAlbumsActivity;
import com.taptech.doufu.ui.activity.MoreNovel2Activity;
import com.taptech.doufu.ui.activity.MoreNovelCategoryActivity;
import com.taptech.doufu.ui.activity.MoreNovelShowActivity;
import com.taptech.doufu.ui.activity.NewAlbumsActivity;
import com.taptech.doufu.ui.activity.NewOthersPersonalActivity;
import com.taptech.doufu.ui.activity.NovelCategoryActivity;
import com.taptech.doufu.ui.activity.OfflineWXActivity;
import com.taptech.doufu.ui.activity.weex.DFBuyBookActivity;
import com.taptech.doufu.ui.activity.weex.MoreNovelWeexActivity;
import com.taptech.doufu.ui.activity.weex.SimpleWeexActivity;
import com.taptech.doufu.ui.activity.SquareActivity;
import com.taptech.doufu.ui.activity.CPRankListActivity;

/**
 * Created by longsiyang on 16/4/6.
 */
public class StartActivityUtils
{
    Context context;
    Intent intent;

    public StartActivityUtils(Context context,Intent intent){
        this.context=context;
        if(intent==null){
            intent=new Intent();
        }
        this.intent=intent;
    }

    //跳转到订阅Activity
    public void toRssActivity(){
        intent.setClass(context, DFRssActivity.class);
        context.startActivity(intent);
    }

    //跳转到离线Activity
    public void toOfflineActivity(){
        intent.setClass(context, OfflineWXActivity.class);
        context.startActivity(intent);
    }

    //跳转到历史Activity
    public void toHistoryActivity(){
        intent.setClass(context, DFHistoryActivity.class);
        context.startActivity(intent);
    }

    public void toMyBuyBookActivity() {
        intent.setClass(context, DFBuyBookActivity.class);
        context.startActivity(intent);
    }

    //跳转到小说更多页面
    public void toNovelMoreActivity(){
        intent.setClass(context, MoreNovel2Activity.class);
        context.startActivity(intent);
    }

    public void toNovelMoreWeexActivity() {
        intent.setClass(context, MoreNovelWeexActivity.class);
        context.startActivity(intent);
    }

    //点击跳转到漫画详情
    public void toCartoonDesActivity(String id){
        SimpleWeexActivity.startActivity(context,"TFNovel/TFComicDetail.js?id="+id,null);
    }

    //跳转到广场
    public void toSquareActivity(){
        intent.setClass(context, SquareActivity.class);
        context.startActivity(intent);
    }

    //跳转到小说分类
    public void toNovelSortActivity(){
        intent.setClass(context, NovelCategoryActivity.class);
        context.startActivity(intent);
    }

    //跳转到书单
    public void toNovelBookListActivity(){
        intent.setClass(context, MoreAlbumsActivity.class);
        context.startActivity(intent);
    }

    //跳换到CP排行
    public void toCpRankActivity(){
        intent.setClass(context, CPRankListActivity.class);
        context.startActivity(intent);
    }



    //跳转到漫画分类详细
    public void toCarttonSortDesActivity(){
        intent.setClass(context, ContainerFragmentActivity.class);
        context.startActivity(intent);
    }



    //跳转到小说更多分类
    public void toMoreNovelCategoryAcitivity(){
        intent.setClass(context, MoreNovelShowActivity.class);
        context.startActivity(intent);
    }
}
